#include "evolutionelementtest.h"

bool EvolutionElementTest::run() {
    short count=0;

    if (!EvolutionElementTest::constructorTest())
        std::cout << "ERROR " << ++count << " EvolutionElementTest::constructorTest() faild!" << std::endl;
    if (!EvolutionElementTest::runTest())
        std::cout << "ERROR " << ++count << " EvolutionElementTest::runTest() faild!" << std::endl;

    return count==0;
}

bool EvolutionElementTest::constructorTest() {
    unsigned int eleven=11;
    Input input;
    input.createPrimeInput(19);
    EvolutionElement* evoElement = new EvolutionElement(eleven,eleven,input);
    delete evoElement;
    return true;
}

bool EvolutionElementTest::runTest() {
    unsigned int amountOfFormulas=16;
    unsigned int sizeOfNewCreatedFormulas=45;
    Input input;
    input.createPrimeInput(100);
    EvolutionElement* evoElement = new EvolutionElement(amountOfFormulas,sizeOfNewCreatedFormulas,input);
    evoElement->run(sizeOfNewCreatedFormulas);
    delete evoElement;
    return true;
}
